package request

type ServiceCreateNoteReq struct {
	Uid       int64  `json:"uid" form:"uid" binding:"required"`
	Title     string `json:"title" form:"title" binding:"required"`
	Status    int    `json:"status" form:"status" binding:"required"`
	Content   string `json:"content" form:"content" binding:"required"`
	StartTime int64  `json:"start_time" form:"start_time"`
	EndTime   int64  `json:"end_time" form:"end_time"`
}

type ServiceListNodeReq struct {
	Uid        int64 `json:"uid" form:"uid" binding:"required"`
	StartIndex int   `json:"start_index" form:"start_index" binding:"min=0"`
	PageSize   int   `json:"page_size" form:"page_size" binding:"min=1,max=100"`
}

type ServiceShowNoteReq struct {
	Id int64 `json:"id" uri:"id" binding:"required,min=1"`
}

type ServiceDeleteNoteReq struct {
	Id int64 `json:"id" uri:"id" binding:"required,min=1"`
}

type ServiceUpdateNoteReq struct {
	//笔记id
	Id        int64  `json:"id" uri:"id" binding:"required,min=1"`
	Title     string `json:"title" form:"title" binding:"required"`
	Status    int    `json:"status" form:"status" binding:"required"`
	Content   string `json:"content" form:"content" binding:"required"`
	StartTime int64  `json:"start_time" form:"start_time"`
	EndTime   int64  `json:"end_time" form:"end_time"`
}

type ServiceSearchNoteReq struct {
	Keyword string `json:"keyword" form:"keyword" binding:"required,min=2"`
}

type CreateNoteReq struct {
	Uid       int64  `json:"uid" form:"uid" binding:"required"`
	Title     string `json:"title" form:"title" binding:"required"`
	Status    int    `json:"status" form:"status" binding:"required"`
	Content   string `json:"content" form:"content" binding:"required"`
	StartTime int64  `json:"start_time" form:"start_time"`
	EndTime   int64  `json:"end_time" form:"end_time"`
}

type ListNoteReq struct {
	Uid        int `json:"uid" form:"uid" binding:"required"`
	StartIndex int `json:"start_index" form:"start_index" binding:"min=0"`
	PageSize   int `json:"page_size" form:"page_size" binding:"min=1,max=100"`
}

type ShowNoteReq struct {
	Id int64 `json:"id" uri:"id" binding:"required,min=1"`
}

type DeleteNoteReq struct {
	Id int64 `json:"id" uri:"id" binding:"required,min=1"`
}

type UpdateNoteReq struct {
	//笔记id
	Id        int64  `json:"id" uri:"id" binding:"required,min=1"`
	Title     string `json:"title" form:"title" binding:"required"`
	Status    int    `json:"status" form:"status" binding:"required"`
	Content   string `json:"content" form:"content" binding:"required"`
	StartTime int64  `json:"start_time" form:"start_time"`
	EndTime   int64  `json:"end_time" form:"end_time"`
}

type SearchNoteReq struct {
	Keyword string `json:"keyword" form:"keyword" binding:"required,min=2"`
}
